package com.yiyuan.app.entity.result;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.guaike.core.entity.annotation.NumberAutoConvert;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @Author: zhangxilin
 * @Date: 2024/5/31
 */
@ApiModel("游戏记录实体")
@Data
public class RecordGameVO implements Serializable {

    @ApiModelProperty("游戏房间名称")
    private String roomName;

    @ApiModelProperty(value = "所在机位", hidden = true)
    private String positionNo;

    @ApiModelProperty("上机时间")
    @DateTimeFormat(pattern = "MM-dd HH:mm:ss")
    @JsonFormat(pattern = "MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    @ApiModelProperty("下机时间")
    @DateTimeFormat(pattern = "MM-dd HH:mm:ss")
    @JsonFormat(pattern = "MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime endTime;

    @ApiModelProperty("消耗松果数量")
    @NumberAutoConvert
    private Long usePinecone;

    @ApiModelProperty("获得松子数量")
    @NumberAutoConvert
    private Long getPineNut;

    @ApiModelProperty("包机记录id")
    private Long recordOccupyId;

    @ApiModelProperty("包机获得松果数量")
    @NumberAutoConvert
    private Long getPinecone;

    public String getRoomName() {
        return roomName + "-" + positionNo;
    }
}
